import { httpPost, httpGet, httpDel, httpPut } from '../index'

export function fetchTree () {
  return httpGet('/api/admin/menu/tree')
}

export function treeList () {
  return httpGet('/api/admin/menu/treeList')
}

// export function pageObjects (query) {
//   return httpGet('/api/admin/menu/page', query)
// }

export function addObj (obj) {
  return httpPost('/api/admin/menu', obj)
}

export function getObj (id) {
  return httpGet('/api/admin/menu/' + id)
}

export function delObj (id) {
  return httpDel('/api/admin/menu/' + id)
}

export function putObj (id, obj) {
  return httpPut('/api/admin/menu/' + id, obj)
}

export function getUrl () {
  return httpGet('/api/admin/menu/url')
}
